{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "69cdb574",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "DatetimeIndex(['2024-01-01', '2024-01-02', '2024-01-03', '2024-01-04',\n",
      "               '2024-01-05', '2024-01-06', '2024-01-07', '2024-01-08',\n",
      "               '2024-01-09', '2024-01-10',\n",
      "               ...\n",
      "               '2024-12-21', '2024-12-22', '2024-12-23', '2024-12-24',\n",
      "               '2024-12-25', '2024-12-26', '2024-12-27', '2024-12-28',\n",
      "               '2024-12-29', '2024-12-30'],\n",
      "              dtype='datetime64[ns]', length=365, freq='D')\n"
     ]
    }
   ],
   "source": [
    "# Seaborn 折线图（Lineplot）基础示例\n",
    "\n",
    "import seaborn as sns\n",
    "import matplotlib.pyplot as plt\n",
    "import pandas as pd\n",
    "import numpy as np\n",
    "\n",
    "# 先设置seaborn主题\n",
    "sns.set_theme(style=\"darkgrid\")\n",
    "\n",
    "# 然后强制设置中文字体\n",
    "plt.rcParams['font.sans-serif'] = ['PingFang HK', 'Hiragino Sans GB', 'STHeiti', 'Arial Unicode MS']\n",
    "plt.rcParams['axes.unicode_minus'] = False\n",
    "plt.rcParams['font.family'] = 'sans-serif'\n",
    "\n",
    "# 创建时间序列数据\n",
    "np.random.seed(42)\n",
    "# 创建一个从2024-01-01开始的365天的日期序列，频率为日\n",
    "dates = pd.date_range('2024-01-01', periods=365, freq='D')\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "fed017b1",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "ml311",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.11.0"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
